#ifndef APPWIN_H
#define APPWIN_H

#include "./base_win.h"
#include "../../video/video_player/mute_player.h"
#include "../../rt/task2.h"

namespace Ui {
class AppWin;
}

class AppWin : public QWidget {
    Q_OBJECT
public:
    explicit AppWin(QWidget *parent = nullptr);
    ~AppWin();

private slots:
    void clickPlay();
    void clickStop();
    void playErr();
    void playSucc();
    void playComplete();

private:
    void play_next();

private:
    Ui::AppWin *ui;
    std::unique_ptr<MutePlayer> m_player;
    QStringList m_files;
    int m_index;

    rt::Task2<> def_task;
};

#endif // APPWIN_H
